//
//  GoodModel.swift
//  AliBaiChuan
//
//  Created by 郑东喜 on 2017/2/23.
//  Copyright © 2017年 郑东喜. All rights reserved.
//

import UIKit

class GoodModel: NSObject {
    
    var comfun:((_ _data:[[String : String]])->Void)?
    
    static let shared = GoodModel()
    
    
    let dicxxx : NSDictionary = ["result" : 0,
                                     "lists" :[["picImgUrl" : "https://www.google.com.hk/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png",
                                                "shopID" : "520706415424",
                                                "price" : "398",
                                                "desc" : "正品好货！比我原来用的iphone強多了"],
                                               ["picImgUrl" : "https://www.google.com.hk/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png",
                                                "shopID" : "520706415424",
                                                "price" : "398",
                                                "desc" : "正品好货！比我原来用的iphone強多了"],
                                               ["picImgUrl" : "https://gdp.alicdn.com/imgextra/i2/1917047079/TB2vX8veXXXXXbkXpXXXXXXXXXX_!!1917047079.png",
                                                "shopID" : "538282868333",
                                                "price" : "5998",
                                                "desc" : "正品好货！比我原来用的iphone強多了"],
        ]
    ]
    
    
    func goodsData(comfun:((_ _data:[[String : String]])->Void)?) -> Void {
        self.comfun = comfun
        
        
        
        let add = self.dicxxx["lists"] as? [[String : String]]
        
        print("\((#file as NSString).lastPathComponent):(\(#line))\n",add)
        
//        let goosArray : NSArray = (self.dic["lists"] as? NSMutableArray)!
        
        
        
//        comfun!(goosArray)
    }
}
